﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace EnterpriseManagement.Models
{
    public enum ExecuteResult
    {
        Success,
        CannotFindProject,
        NoTeamMemberInformation,
        SetEndTimeError,
        UpdateProjectPeopleNumberError,
        ChangeProjectError,
        CreateProjectError,
        DeleteProjectError,
        NotExistRelatedUser,
        PasswordError,
        AddTeammemberError,
        UpdateProjectError,
        UpdateTeamMemberError,
        DeleteUserError,
        UpdateEmployeeError,
        CreateClientError,
    }

    public class ErrorHandling
    {
        public static string ErrorCodeToString(ExecuteResult result)
        {
            switch (result) 
            {
                case ExecuteResult .CannotFindProject:
                    return "未能找到相关项目信息";
                case ExecuteResult .NoTeamMemberInformation :
                    return "无项目成员信息";
                default :
                    return "系统出错，请联系管理员处理";
            }
        }
    }
}